home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ASME's Mechanical Engine…ing Toolkit 1997 December
/
ASME's Mechanical Engineering Toolkit 1997 December.iso
/
cad_elec
/
gerbtool.exe
/
DATA.1
/
SHIP.MAC
< prev
next >
Wrap
Text File
|
1995-10-23
|
2KB
|
71 lines
MACRO ship
SetPrompt "Ship", "waiting..."
MessageBox "Design Shipper", "This macro ZIPs all files required to ship the\n \
currently loaded design as a single file.\nPKZIP.EXE must be in the PATH!\nContinue?", 1
IF $$STATUS == $$NO
STOP
END
MessageBox "Warning", "This macro does not scan for Custom apertures.\n \
It is assumed that you have expanded all Custom\n \
apertures with the Edit/Dcode/Expand command prior\n \
to running this macro.\nContinue?", 1
IF $$STATUS == $$NO
STOP
END
Set $lyr = 1
FileOpen $fd, "_ziplst_", "w"
FileWrite $fd, "%s", $$DSNNAME
REPEAT $lyr <= $$MAXLAYERS
GetLayer $lyr, $fn, $ln, $ap, $vis, $fc, $dc, $type, \
$pol, $key, $ftype, $lx, $ly, $ux, $uy, $netid
IF $$STATUS
FileWrite $fd, "%s\n%s", $fn, $ap
END
Calc $lyr = $lyr + 1
END
FileClose $fd
SplitPath $$DSNNAME, $dir, $file, $ext
StrWrite $zipfile, "%s\%s.zip", $dir, $file # compose the zip filename
FileOpen $fd, $zipfile, "r" # see if it exists already
IF $$STATUS
FileClose $fd # it does exist
StrWrite $msg, "%s already exists!\nContinue?", $zipfile
MessageBox "Design Compression", $msg, 1
IF $$STATUS == $$NO
STOP
END
END
StrWrite $cmdline, "pkzip %s @_ziplst_", $zipfile
SetPrompt "Ship", "zipping..."
SysCmd $cmdline
SysCmd "del _ziplst_"
SetPrompt "Ship", "waiting..."
StrWrite $msg, "Your design has been zipped into %s", $zipfile
MessageBox "Design Shipper", $msg, 0
ENDMACRO